<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::BG0ROMDrawable Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html">BG0ROMDrawable</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="struct_sifteo_1_1_b_g0_r_o_m_drawable-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::BG0ROMDrawable Struct Reference<div class="ingroups"><a class="el" href="group__video.html">Video</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A VRAM accessor for drawing graphics in the BG0_ROM mode.  
 <a href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="bg0rom_8h_source.html">sifteo/video/bg0rom.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a1654819d4b26ba0733269c49e9d1c123"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a1654819d4b26ba0733269c49e9d1c123">ColorMode</a> </td></tr>
<tr class="memdesc:a1654819d4b26ba0733269c49e9d1c123"><td class="mdescLeft">&#160;</td><td class="mdescRight">Color modes, XOR'ed with the tile IDs below. <br/></td></tr>
<tr class="separator:a1654819d4b26ba0733269c49e9d1c123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada13ca0ac5108834ce02bd3956e956d4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a> </td></tr>
<tr class="memdesc:ada13ca0ac5108834ce02bd3956e956d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Palette IDs, XOR'ed with the tile IDs below. <br/></td></tr>
<tr class="separator:ada13ca0ac5108834ce02bd3956e956d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd9db57c562b2e8056ad70ff03468ef"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468ef">Tiles</a> { <br/>
&#160;&#160;<a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468efa8bb53f4719b57f3c4de9fef4884fc13f">FONT_SPACE</a> = 0, 
<a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468efa884b5cad289e4e65e94ea3d6c076564f">SOLID_BG</a> = 0, 
<a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468efa77a182f493e1a37e27494dce9b016df1">SOLID_FG</a> = 104, 
<a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468efac4867a3d2c025af377e92fa46ec69357">V_BARGRAPH</a> = 224, 
<br/>
&#160;&#160;<a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468efa89635bc9e1e5e10497369c80468c1998">H_BARGRAPH</a> = 231
<br/>
 }</td></tr>
<tr class="memdesc:abfd9db57c562b2e8056ad70ff03468ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Well-known tile numbers.  <a href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468ef">More...</a><br/></td></tr>
<tr class="separator:abfd9db57c562b2e8056ad70ff03468ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1de09880974da8b3abc7be5f5a886ccf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1de09880974da8b3abc7be5f5a886ccf"></a>
<a class="el" href="struct_sifteo_1_1_cube_i_d.html">CubeID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a1de09880974da8b3abc7be5f5a886ccf">cube</a> () const </td></tr>
<tr class="memdesc:a1de09880974da8b3abc7be5f5a886ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the <a class="el" href="struct_sifteo_1_1_cube_i_d.html" title="A lightweight identifier for one Sifteo cube.">CubeID</a> associated with this drawable. <br/></td></tr>
<tr class="separator:a1de09880974da8b3abc7be5f5a886ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3532b526f471b521e78d4fff0cf82d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3532b526f471b521e78d4fff0cf82d5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ae3532b526f471b521e78d4fff0cf82d5">erase</a> (uint16_t index=0)</td></tr>
<tr class="memdesc:ae3532b526f471b521e78d4fff0cf82d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase mode-specific VRAM, filling the BG0 buffer with the specified value and resetting the panning registers. <br/></td></tr>
<tr class="separator:ae3532b526f471b521e78d4fff0cf82d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ebe3bee2c3844617deb7d50feecdb15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a5ebe3bee2c3844617deb7d50feecdb15">fill</a> (<a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a> topLeft, <a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a> size, unsigned tileIndex)</td></tr>
<tr class="memdesc:a5ebe3bee2c3844617deb7d50feecdb15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a rectangle of identical tiles, specified as a top-left corner location and a size.  <a href="#a5ebe3bee2c3844617deb7d50feecdb15">More...</a><br/></td></tr>
<tr class="separator:a5ebe3bee2c3844617deb7d50feecdb15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8bf59b97d0bafffb52851ed0f7cd3d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8bf59b97d0bafffb52851ed0f7cd3d5"></a>
<a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#af8bf59b97d0bafffb52851ed0f7cd3d5">getPanning</a> () const </td></tr>
<tr class="memdesc:af8bf59b97d0bafffb52851ed0f7cd3d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the last value set by <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ac622307cec20b9d778f8616bcf29a83e" title="Change the hardware pixel-panning origin for this mode.">setPanning()</a>, modulo the layer size in pixels. <br/></td></tr>
<tr class="separator:af8bf59b97d0bafffb52851ed0f7cd3d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8859d8ae416c0a4dd20c6251d36db81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ad8859d8ae416c0a4dd20c6251d36db81">hBargraph</a> (<a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a> topLeft, unsigned <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a2cd26883932767e425ec0b53eeccde6d">pixelWidth</a>, enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a> palette=BLACK, unsigned <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#aae5a14cd1c101de1d888e270b6328cf5">tileHeight</a>=1)</td></tr>
<tr class="memdesc:ad8859d8ae416c0a4dd20c6251d36db81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a horizontal bargraph, with its top-left corner position specified in tiles, and its width in pixels.  <a href="#ad8859d8ae416c0a4dd20c6251d36db81">More...</a><br/></td></tr>
<tr class="separator:ad8859d8ae416c0a4dd20c6251d36db81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6579076bcbda035a15f119a4c9fb7651"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a6579076bcbda035a15f119a4c9fb7651">plot</a> (<a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a> pos, uint16_t tileIndex)</td></tr>
<tr class="memdesc:a6579076bcbda035a15f119a4c9fb7651"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot a single tile, at location 'pos', in tile units.  <a href="#a6579076bcbda035a15f119a4c9fb7651">More...</a><br/></td></tr>
<tr class="separator:a6579076bcbda035a15f119a4c9fb7651"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac622307cec20b9d778f8616bcf29a83e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ac622307cec20b9d778f8616bcf29a83e">setPanning</a> (<a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a> pixels)</td></tr>
<tr class="memdesc:ac622307cec20b9d778f8616bcf29a83e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the hardware pixel-panning origin for this mode.  <a href="#ac622307cec20b9d778f8616bcf29a83e">More...</a><br/></td></tr>
<tr class="separator:ac622307cec20b9d778f8616bcf29a83e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa21f7f40e1b00a6b427ec66b9fdd44c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#aa21f7f40e1b00a6b427ec66b9fdd44c2">span</a> (<a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a> pos, unsigned width, unsigned tileIndex)</td></tr>
<tr class="memdesc:aa21f7f40e1b00a6b427ec66b9fdd44c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot a horizontal span of tiles, given the position of the leftmost tile, and the number of tiles to plot.  <a href="#aa21f7f40e1b00a6b427ec66b9fdd44c2">More...</a><br/></td></tr>
<tr class="separator:aa21f7f40e1b00a6b427ec66b9fdd44c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bbff31aae7aa5d5a0f23a36aa058edc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a6bbff31aae7aa5d5a0f23a36aa058edc">text</a> (<a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a> topLeft, const char *str, enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a> palette=BLACK)</td></tr>
<tr class="memdesc:a6bbff31aae7aa5d5a0f23a36aa058edc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw text, using the builtin ROM font, starting at location 'topLeft' in tiles.  <a href="#a6bbff31aae7aa5d5a0f23a36aa058edc">More...</a><br/></td></tr>
<tr class="separator:a6bbff31aae7aa5d5a0f23a36aa058edc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81a49c8fbb2215fb19833c2d0a477fea"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a81a49c8fbb2215fb19833c2d0a477fea">tileAddr</a> (<a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a> pos)</td></tr>
<tr class="memdesc:a81a49c8fbb2215fb19833c2d0a477fea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the video buffer address of a particular tile.  <a href="#a81a49c8fbb2215fb19833c2d0a477fea">More...</a><br/></td></tr>
<tr class="separator:a81a49c8fbb2215fb19833c2d0a477fea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26cb40d8042af7763264dd36f8987be6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26cb40d8042af7763264dd36f8987be6"></a>
_SYSVideoBuffer &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a26cb40d8042af7763264dd36f8987be6">videoBuffer</a> ()</td></tr>
<tr class="memdesc:a26cb40d8042af7763264dd36f8987be6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the <a class="el" href="struct_sifteo_1_1_video_buffer.html" title="A memory buffer which holds graphics data.">VideoBuffer</a> associated with this drawable. <br/></td></tr>
<tr class="separator:a26cb40d8042af7763264dd36f8987be6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a0d3e6d2ad6fff5d0876d7d3a03f4887f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d3e6d2ad6fff5d0876d7d3a03f4887f"></a>
static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a0d3e6d2ad6fff5d0876d7d3a03f4887f">charTile</a> (char c, enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a> palette=BLACK)</td></tr>
<tr class="memdesc:a0d3e6d2ad6fff5d0876d7d3a03f4887f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the tile index of one character in the ROM font. <br/></td></tr>
<tr class="separator:a0d3e6d2ad6fff5d0876d7d3a03f4887f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f081d71f83e30d822bdc34b4092f040"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f081d71f83e30d822bdc34b4092f040"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a1f081d71f83e30d822bdc34b4092f040">pixelHeight</a> ()</td></tr>
<tr class="memdesc:a1f081d71f83e30d822bdc34b4092f040"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the height, in pixel, of this mode. <br/></td></tr>
<tr class="separator:a1f081d71f83e30d822bdc34b4092f040"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af821801766a8181551e69d521f7843a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af821801766a8181551e69d521f7843a3"></a>
static <a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#af821801766a8181551e69d521f7843a3">pixelSize</a> ()</td></tr>
<tr class="memdesc:af821801766a8181551e69d521f7843a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the size of this mode as a vector, in pixels. <br/></td></tr>
<tr class="separator:af821801766a8181551e69d521f7843a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cd26883932767e425ec0b53eeccde6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cd26883932767e425ec0b53eeccde6d"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a2cd26883932767e425ec0b53eeccde6d">pixelWidth</a> ()</td></tr>
<tr class="memdesc:a2cd26883932767e425ec0b53eeccde6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the width, in pixels, of this mode. <br/></td></tr>
<tr class="separator:a2cd26883932767e425ec0b53eeccde6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a988fed2cf0c23900cb0bedaa55ea5f38"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a988fed2cf0c23900cb0bedaa55ea5f38"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a988fed2cf0c23900cb0bedaa55ea5f38">sizeInBytes</a> ()</td></tr>
<tr class="memdesc:a988fed2cf0c23900cb0bedaa55ea5f38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of this drawable's tile data, in bytes. <br/></td></tr>
<tr class="separator:a988fed2cf0c23900cb0bedaa55ea5f38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66b61208a0fb39bd21329c20fb477eba"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66b61208a0fb39bd21329c20fb477eba"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a66b61208a0fb39bd21329c20fb477eba">sizeInWords</a> ()</td></tr>
<tr class="memdesc:a66b61208a0fb39bd21329c20fb477eba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of this drawable's tile data, in 16-bit words. <br/></td></tr>
<tr class="separator:a66b61208a0fb39bd21329c20fb477eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae5a14cd1c101de1d888e270b6328cf5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae5a14cd1c101de1d888e270b6328cf5"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#aae5a14cd1c101de1d888e270b6328cf5">tileHeight</a> ()</td></tr>
<tr class="memdesc:aae5a14cd1c101de1d888e270b6328cf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the height, in tiles, of this mode. <br/></td></tr>
<tr class="separator:aae5a14cd1c101de1d888e270b6328cf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a179d01b657e7de2984b9d1ff79b447f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a179d01b657e7de2984b9d1ff79b447f0"></a>
static <a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#a179d01b657e7de2984b9d1ff79b447f0">tileSize</a> ()</td></tr>
<tr class="memdesc:a179d01b657e7de2984b9d1ff79b447f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the size of this mode as a vector, in tiles. <br/></td></tr>
<tr class="separator:a179d01b657e7de2984b9d1ff79b447f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ad8fdbfc64918587a226b780d05874"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7ad8fdbfc64918587a226b780d05874"></a>
static unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ac7ad8fdbfc64918587a226b780d05874">tileWidth</a> ()</td></tr>
<tr class="memdesc:ac7ad8fdbfc64918587a226b780d05874"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the width, in tiles, of this mode. <br/></td></tr>
<tr class="separator:ac7ad8fdbfc64918587a226b780d05874"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A VRAM accessor for drawing graphics in the BG0_ROM mode. </p>
<p>We have an 18x18 tile grid, just like the normal BG0 mode, but the tile data in our case comes from a built-in image ROM in the cube firmware.</p>
<p>This mode can be used to draw specific built-in graphics, or it can be used to draw debug text using the cube's built-in ROM font. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="abfd9db57c562b2e8056ad70ff03468ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#abfd9db57c562b2e8056ad70ff03468ef">Sifteo::BG0ROMDrawable::Tiles</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Well-known tile numbers. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="abfd9db57c562b2e8056ad70ff03468efa8bb53f4719b57f3c4de9fef4884fc13f"></a>FONT_SPACE</em>&nbsp;</td><td class="fielddoc">
<p>First character in the font, ASCII space. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="abfd9db57c562b2e8056ad70ff03468efa884b5cad289e4e65e94ea3d6c076564f"></a>SOLID_BG</em>&nbsp;</td><td class="fielddoc">
<p>Solid background-colored tile (space) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="abfd9db57c562b2e8056ad70ff03468efa77a182f493e1a37e27494dce9b016df1"></a>SOLID_FG</em>&nbsp;</td><td class="fielddoc">
<p>Solid foreground-colored tile. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="abfd9db57c562b2e8056ad70ff03468efac4867a3d2c025af377e92fa46ec69357"></a>V_BARGRAPH</em>&nbsp;</td><td class="fielddoc">
<p>First tile in the vertical bargraph series. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="abfd9db57c562b2e8056ad70ff03468efa89635bc9e1e5e10497369c80468c1998"></a>H_BARGRAPH</em>&nbsp;</td><td class="fielddoc">
<p>First tile in the horizontal bargraph series. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5ebe3bee2c3844617deb7d50feecdb15"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td>
          <td class="paramname"><em>topLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>tileIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Fill a rectangle of identical tiles, specified as a top-left corner location and a size. </p>
<p>All coordinates must be in range. This function performs no clipping. </p>

</div>
</div>
<a class="anchor" id="ad8859d8ae416c0a4dd20c6251d36db81"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::hBargraph </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a>&#160;</td>
          <td class="paramname"><em>topLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>pixelWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a>&#160;</td>
          <td class="paramname"><em>palette</em> = <code>BLACK</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>tileHeight</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Draw a horizontal bargraph, with its top-left corner position specified in tiles, and its width in pixels. </p>
<p>The progress bar is drawn using tiles from the ROM. Fully empty tiles are not drawn. Completely full tiles are drawn using a SOLID_FG tile, and partially full tiles use the BARGRAPH series of tile images. </p>

</div>
</div>
<a class="anchor" id="a6579076bcbda035a15f119a4c9fb7651"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::plot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>tileIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Plot a single tile, at location 'pos', in tile units. </p>
<p>All coordinates must be in range. This function performs no clipping. </p>

</div>
</div>
<a class="anchor" id="ac622307cec20b9d778f8616bcf29a83e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::setPanning </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a>&#160;</td>
          <td class="paramname"><em>pixels</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Change the hardware pixel-panning origin for this mode. </p>
<p>The supplied vector is interpreted as the location on the tile buffer, in pixels, where the origin of the LCD will begin.</p>
<p>BG0 is an 18x18 buffer that wraps around in both directions. </p>

</div>
</div>
<a class="anchor" id="aa21f7f40e1b00a6b427ec66b9fdd44c2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::span </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>tileIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Plot a horizontal span of tiles, given the position of the leftmost tile, and the number of tiles to plot. </p>
<p>All coordinates must be in range. This function performs no clipping. </p>

</div>
</div>
<a class="anchor" id="a6bbff31aae7aa5d5a0f23a36aa058edc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::BG0ROMDrawable::text </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Int2</a>&#160;</td>
          <td class="paramname"><em>topLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="struct_sifteo_1_1_b_g0_r_o_m_drawable.html#ada13ca0ac5108834ce02bd3956e956d4">Palette</a>&#160;</td>
          <td class="paramname"><em>palette</em> = <code>BLACK</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Draw text, using the builtin ROM font, starting at location 'topLeft' in tiles. </p>
<p>Drawing characters not present in the ROM font will have undefined results. </p>

</div>
</div>
<a class="anchor" id="a81a49c8fbb2215fb19833c2d0a477fea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t Sifteo::BG0ROMDrawable::tileAddr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">UInt2</a>&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the video buffer address of a particular tile. </p>
<p>All coordinates must be in range. This function performs no clipping. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="bg0rom_8h_source.html">bg0rom.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
